package basic_1003;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		
		int M=scanner.nextInt();
		int N=scanner.nextInt();
		
		scanner.close();
		
		List<Long>primes=new ArrayList<Long>();
		primes.add((long) 2);
		primes.add((long) 3);
		primes.add((long) 5);
		primes.add((long) 7);
		primes.add((long) 11);
		primes.add((long) 13);
		
		if(N>primes.size()) {
			for(int i=primes.size();i<N;i++) {
				primes.add(getNextPrime(primes));
			}
		}
		
		int flag=1;
		for(int i=M-1;i<N;i++) {
			System.out.print(primes.get(i));
			if(flag<10&&i<N-1) {
				System.out.print(" ");
				flag++;
			}else if(flag==10&&i<N-1) {
				flag=1;
				System.out.print("\n");
			}
		}
		
	}
	
	public static long getNextPrime(List<Long>primes) {

		for(long index=primes.get(primes.size()-1)+2;;index+=2) {
			boolean flag=true;
			for(long prePrime:primes) {
				if(index%prePrime==0) {
					flag=false;
					break;
				}
			}
			if(flag) {
				return index;
			}
		}
	}
}
